package org.jsrml.core.purchaser.qo;

import org.jsrml.common.persistence.BaseQO;
import org.jsrml.common.persistence.query.QueryCondition;
import org.jsrml.common.persistence.query.QueryConditionGroup;
import org.jsrml.common.persistence.query.QueryConditionType;
import org.jsrml.common.persistence.query.QueryConfig;

@SuppressWarnings("serial")
@QueryConfig(daoBeanId = "positionsService")
public class PositionsQO extends BaseQO<String> {
	
	@QueryConditionGroup(value="group1")
	@QueryCondition(name = "positionCode",type=QueryConditionType.LIKE_ANYWHERE)
	private String code;

	@QueryConditionGroup(value="group1")
	@QueryCondition(name = "positionName", type=QueryConditionType.LIKE_ANYWHERE)
	private String name;
	
	@QueryCondition(name = "department", type = QueryConditionType.LEFT_JOIN)
	private DepartmentQO departmentQO;

	@QueryCondition(name = "department", type = QueryConditionType.FETCH_EAGER)
	private Boolean fetchDepartment;

	@QueryCondition(name = "status.remove")
	private Boolean remove;

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}


	public Boolean getRemove() {
		return remove;
	}

	public void setRemove(Boolean remove) {
		this.remove = remove;
	}

	public DepartmentQO getDepartmentQO() {
		return departmentQO;
	}

	public void setDepartmentQO(DepartmentQO departmentQO) {
		this.departmentQO = departmentQO;
	}

	public Boolean getFetchDepartment() {
		return fetchDepartment;
	}

	public void setFetchDepartment(Boolean fetchDepartment) {
		this.fetchDepartment = fetchDepartment;
	}
	
}
